09-04 - Introduction

Dear Heavenly Father,
As we gather here today to embark on a new journey of learning, we invite Your presence into this classroom.
Bless each student with wisdom, understanding, and a thirst for knowledge. Let Your light shine upon us, illuminating the path of learning, so we may contemplate your beauty and love in everything you made.
May this classroom be a place of respect, fellowship, and growth. Help us to be open to new ideas, to embrace challenges, and to support one another in our academic endeavors. Bless this class so that it may be a space where minds are enriched, friendships are formed, and hearts are touched.
Guide our imaginations and desires towards your love and justice, so that we may respond adequately to your call to be Christ’s agents of renewal in the world.
Through our Lord Jesus Christ, your Son, who lives and reigns with you in the unity of the Holy Spirit, one God, for ever and ever.
Amen.

Introductions

Why programming?

  • Creation:
    • Computing is part of God’s world
      • it reveals wisdom and ingenuity on how God made things work (see Isaiah 28:23-29)
      • it is enabling science today (study of God’s world)
      • it is enabling new technology today (building culture for God’s glory)
    • The process of breaking down a problem into precise steps can be a form of developing intellectual virtue
    • Through discovery and automation, it can enable human flourishing
    • There is joy in the process (creative, rewarding, fun)
  • Fall:
    • It is being centralized into few powerful actors, harming cultural diversity and freedom
    • It is alienating people from God’s good created order
    • It is being misused for Mammon
    • Constantly idolized
  • Redemption:
    • We’re called to follow Jesus in showing God’s glory through our cultural activity, which includes computing and its virtuous practice on:
      • imagining
      • designing
      • regulating
      • using

Let’s know each other

Stand up and sit when someone says what you would say:

  • 1st round: major
  • 2nd round: favorite sport
  • 3rd round: favorite board game

Who am I?

Prof. Fernando Santos

  • From São Carlos, Brazil
    • Portuguese, not Spanish!
    • Cerrado (“brazilian savannah”), not jungle!
  • Major in computer engineering, PhD in complex systems modeling
  • Married to Jemima, dad of Suzana (6) and Natanael (4)

Our relationship

Heidelberg Catechism Q&A 107:

When god forbids envy, hatred, and anger, he commands us to [h] love our neighbor as ourselves; to show [i] patience, peace, [j] meekness, [k] mercy, and all kindness, towards him, [l] and prevent his hurt as much as in us lies’ and that we [m] do good, even to our enemies.

[a]: Mat. 5:21,22Prov. 12:18Mat. 26:52
[b]: Eph. 4:26Rom. 12:19Mat. 5:39,40
[c]: Mat. 4:5,6,7Col. 2:23
[d]: Gen. 9:6Mat. 26:52Rom. 13:4
[e]: James 1:20Gal. 5:20
[f]: Rom. 1:291John 2:9
[g]: 1John 3:15
[h]: Mat. 22:39Mat. 7:12
[i]: Rom. 12:10
[j]: Eph. 4:2Gal. 6:1,2Mat. 5:5Rom. 12:18
[k]: Ex. 23:5
[l]: Mat. 5:45
[m]: Rom. 12:20

  • How can I make this course lovely to you?
    • Sometimes, it is even not lovely to me…
    • Together we can make it!
  • Let’s make “a community of people who love knowledge”
    • Not easy! We need God.
    • Get to know each other more. Change seats whenever you can!
  • Come to my office in the next days to grab a treat and chat!

Syllabus Bingo

Quizzes Websites I need to register Study sessions
Software we are using Office hours ChatGPT
Readings Diversity and inclusion Schedule

Program

  • Programming = writing programs. What are programs?

Programs are forms of wisdom

22 “The Lord brought me forth as the first of his works, before his deeds of old; 23 I was formed long ages ago, at the very beginning, when the world came to be. 24 When there were no watery depths, I was given birth, when there were no springs overflowing with water; 25 before the mountains were settled in place, before the hills, I was given birth, 26 before he made the world or its fields or any of the dust of the earth. 27 I was there when he set the heavens in place, when he marked out the horizon on the face of the deep, 28 when he established the clouds above and fixed securely the fountains of the deep, 29 when he gave the sea its boundary so the waters would not overstep his command, and when he marked out the foundations of the earth. 30 Then I was constantly at his side. I was filled with delight day after day, rejoicing always in his presence, 31 rejoicing in his whole world and delighting in mankind. Proverbs 8.22-31

Drawing as a program

Computation

  • We use programs to compute numbers.

Automatic computation

  • Charles Babbage is known for developing the first automatic computer machine (1820’s)
    • “the faster and more reliably one could calculate, the more money businesses could make.”

  • Ada Lovelace, daughter of Lord Byron, became enamoured by Babbage’s machine and developed the first algorithm, to calculate a sum of numbers:

Algorithm

  • Basically, a program: a description of a series of operations.
  • But with some specific features:
    1. Precise and unambiguous steps
    2. Definite results
    3. Finite
    4. Generalizable (works with a range of possible inputs)
    5. Usually expressed through abstract/mathematical notation

STEM today is programming computations

  • For complex calculations, we don’t rely anymore on pressing calculator buttons. We have to make automatic computation programs

Code

  • Initially, computer operators had to set the program manually to run…

Punched cards

  • At the end of the 1800s, Herman Hollerith invented the punched card, to be automatically read by a machine.
  • Instructions were then CODED in the punched card.

Grace Hopper’s proposal

  • Later, in 1949, Grace Hopper invented the first programming language: COBOL (COmmon Business-Oriented Language)
    • For example, the user would write: COMPUTE SUM = (1 + 3) DIVIDE SUM BY 2 GIVING AVERAGE
  • Crucial to this was the development of the compiler: a program capable of converting a sentence very much like an English phrase (with syntax and semantics) into machine instructions.

So, what’s a code?

  • “A program that follows a set of rules” (in order to be correctly interpreted)
  • To learn how to program, then, is to learn how to express yourself correctly through the code
    • Notice the origin of the word - codex

Python programming language

  • Invented in the early 1990s by Guido van Rossum, named after Monty Python’s Flying Circus
  • Open source project
  • High-level, general-purpose language
  • Widely available, easy to learn, rich in tools and libraries, and portable

https://spectrum.ieee.org/top-programming-languages-2022

The pictionary game

  • How difficult it is to describe to someone how to draw something?
    • Instructions may be ambiguous
    • Different backgrounds, ways of interpreting…
  • So happens with programming. The drama of programming is the drama of all human communication/expression…

Example: Drawing a rectangle

  • Say to a computer “Draw a red rectangle in the top left corner of the screen.”

    • What shade of red, precisely?
    • How big should the rectangle be?
    • Exactly in the top left, or with some padding, and how much?
    • When should it be drawn?
    • What is the “top” of the screen on a mobile device that can be rotated?
  • Code in Javascript:
// Get the canvas on the webpage that we want to render to.
let c = document.getElementById("myCanvas");
// Ask the canvas for an object that knows how to render 2-dimensional graphics onto the canvas.
let renderer = c.getContext("2d");
// Set the color to render, then draw a 100 x 100 pixel rectangle.
renderer.fillStyle = "rgb(255, 0, 0)";
renderer.fillRect(0, 0, 100, 100);
  • Notice that many things that do not matter when we give instructions to other people actually do matter for the computer. And vice-versa…
    • Why is that?